home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / audiofile / AFgetmiscids.z / AFgetmiscids
Encoding:
Text File  |  2002-10-03  |  11.0 KB  |  199 lines

  1.  
  2.  
  3.  
  4. aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm))))                                            aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      afGetMiscIDs,  afGetMiscType, afGetMiscSize - get number and list of
  10.      miscellaneous chunk ID's for a file, get the data type and size for a
  11.      miscellaneous data chunk.
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
  15.  
  16.      iiiinnnntttt aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt mmmmiiiisssscccciiiiddddssss[[[[]]]]))))
  17.  
  18.      iiiinnnntttt aaaaffffGGGGeeeettttMMMMiiiissssccccTTTTyyyyppppeeee((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt cccchhhhuuuunnnnkkkkiiiidddd))))
  19.  
  20.      iiiinnnntttt aaaaffffGGGGeeeettttMMMMiiiissssccccSSSSiiiizzzzeeee((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt cccchhhhuuuunnnnkkkkiiiidddd))))
  21.  
  22. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  23.      _f_i_l_e      is an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure, created when an audio file was
  24.                opened by a call to aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm).
  25.  
  26.      _m_i_s_c_i_d_s[] is an array of integer locations used to return a list of
  27.                unique positive miscellaneous chunk ID's which can be used to
  28.                reference the miscellaneous chunks in a file.
  29.  
  30.      _c_h_u_n_k_i_d   is a miscellaneous chunk id from the _m_i_s_c_i_d_s[] list returned by
  31.                aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))).
  32.  
  33. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  34.      aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))) returns a nonnegative integer count of the number of
  35.      miscellaneous chunks in the file, or -1 on error.
  36.  
  37.      aaaaffffGGGGeeeettttMMMMiiiissssccccTTTTyyyyppppeeee(((()))) returns a positive symbolic constant denoting the chunk
  38.      type for a given miscellaneous chunk ID. If there is an error or the
  39.      chunk ID is invalid for the file, the return value is -1.
  40.  
  41.      aaaaffffGGGGeeeettttMMMMiiiissssccccSSSSiiiizzzzeeee(((()))) returns a nonnegative integer count of the number of data
  42.      bytes contained in the specified chunk, or -1 on error.
  43.  
  44. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  45.      The Audio File Library allows you to access file format-specific non-
  46.      audio data chunks in audio files through miscellaneous chunk ID's.  Each
  47.      ID corresponds to a chunk type and a chunk data size in bytes.
  48.  
  49.      aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))) returns the number of miscellaneous chunks contained in
  50.      _f_i_l_e.  You can call aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))) with a null _m_i_s_c_i_d_s pointer, and
  51.      allocate a _m_i_s_c_i_d_s[] buffer according to the return value.
  52.  
  53.      You can then pass the _m_i_s_c_i_d_s[] buffer back to aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))) to obtain a
  54.      list of ID's for the various chunks of miscellaneous data in _f_i_l_e.
  55.  
  56.      aaaaffffGGGGeeeettttMMMMiiiissssccccTTTTyyyyppppeeee(((()))) gives you the chunk type for a given chunk ID.  Valid
  57.      miscellaneous data types are:
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm))))                                            aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      AAAAFFFF____MMMMIIIISSSSCCCC____CCCCOOOOPPPPYYYY      Copyright string
  75.  
  76.      AAAAFFFF____MMMMIIIISSSSCCCC____AAAAUUUUTTTTHHHH      Author/artist string
  77.  
  78.      AAAAFFFF____MMMMIIIISSSSCCCC____NNNNAAAAMMMMEEEE      Name string
  79.  
  80.      AAAAFFFF____MMMMIIIISSSSCCCC____AAAANNNNNNNNOOOO      AIFF/AIFF-C annotation string
  81.  
  82.      AAAAFFFF____MMMMIIIISSSSCCCC____MMMMIIIIDDDDIIII      AIFF/AIFF-C MIDI system exclusive data
  83.  
  84.      AAAAFFFF____MMMMIIIISSSSCCCC____AAAAPPPPPPPPLLLL      AIFF/AIFF-C application-specific data
  85.  
  86.      AAAAFFFF____MMMMIIIISSSSCCCC____PPPPCCCCMMMMMMMMAAAAPPPP    PCM mapping information (for future use)
  87.  
  88.      AAAAFFFF____MMMMIIIISSSSCCCC____NNNNeeeeXXXXTTTT      NeXT file info chunk
  89.  
  90.      AAAAFFFF____MMMMIIIISSSSCCCC____IIIIRRRRCCCCAAAAMMMM____PPPPEEEEAAAAKKKKAAAAMMMMPPPP
  91.                        BICSF peak amplitude sfcode
  92.  
  93.      AAAAFFFF____MMMMIIIISSSSCCCC____CCCCOOOOMMMMMMMMEEEENNNNTTTT   Text comment string.  The tags AAAAFFFF____MMMMIIIISSSSCCCC____IIIIRRRRCCCCAAAAMMMM____CCCCOOOOMMMMMMMMEEEENNNNTTTT
  94.                        and AAAAFFFF____MMMMIIIISSSSCCCC____IIIICCCCMMMMTTTT are also allowed for this type, though
  95.                        this chunk is supported by several file types.
  96.  
  97.      AAAAFFFF____MMMMIIIISSSSCCCC____IIIICCCCRRRRDDDD      Creation date string.  This is usually of the form
  98.                        "YYYY-MM-DD".
  99.  
  100.      AAAAFFFF____MMMMIIIISSSSCCCC____IIIISSSSFFFFTTTT      Software name string.  Usually set to the name of the
  101.                        software package which created the sound.
  102.  
  103.      AAAAFFFF____MMMMIIIISSSSCCCC____UUUUNNNNRRRREEEECCCCOOOOGGGGNNNNIIIIZZZZEEEEDDDD
  104.                        unrecognized data chunk
  105.  
  106.      See the AIFF-C spec for descriptions of the first six chunks, and the
  107.      various audio format man pages (nnnneeeexxxxtttt(4), bbbbiiiiccccssssffff(3dm)) for the remainder.
  108.      Since the AIFF-C format is extensible, and new audio file formats are
  109.      likely to be added to the AF in future versions, the AAAAFFFF____MMMMIIIISSSSCCCC____UUUUNNNNRRRREEEECCCCOOOOGGGGNNNNIIIIZZZZEEEEDDDD
  110.      data type is included to handle any data chunks encountered in a file
  111.      which are neither part of the AIFF-C standard nor recognized by the other
  112.      currently supported file formats.
  113.  
  114.      aaaaffffGGGGeeeettttMMMMiiiissssccccSSSSiiiizzzzeeee(((()))) returns the number of data bytes in the chunk.
  115.  
  116.      Note: for AIFF-C (AIFF) files, you don't have to worry about the possible
  117.      trailing zero pad byte at the end of a miscellaneous chunk data area.
  118.      The library hides this file format implementation detail.
  119.  
  120. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  121.      The routine aaaaffffRRRReeeeaaaaddddMMMMiiiisssscccc(3dm) allows you to read miscellaneous data from an
  122.      audio file.  In order to read a copyright string from an AIFF-C file, for
  123.      example, you first obtain a list of miscellaneous chunk ID's for the file
  124.      by querying aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))).
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm))))                                            aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm))))
  137.  
  138.  
  139.  
  140.      You determine the type of each miscellaneous chunk by calling
  141.      aaaaffffGGGGeeeettttMMMMiiiissssccccTTTTyyyyppppeeee(((()))) for each of the ID's.  The ID which has chunk type
  142.      AAAAFFFF____MMMMIIIISSSSCCCC____CCCCOOOOPPPPYYYY corresponds to the copyright string in the file.
  143.  
  144.      You can determine the length of the string by passing the ID to
  145.      aaaaffffGGGGeeeettttMMMMiiiissssccccSSSSiiiizzzzeeee(((()))), and allocate a buffer with the appropriate length
  146.      (allocate one extra location for the null-terminator).
  147.  
  148.      Finally, you obtain a copy of the string by passing the chunk ID, buffer,
  149.      and buffer length to aaaaffffRRRReeeeaaaaddddMMMMiiiisssscccc(3dm).  Put a null character in the last
  150.      buffer location to null-terminate the string.
  151.  
  152. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  153.      These functions may return ANY type of misc chunk, even one not included
  154.      in <ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>.  As indicated above, the possible types of misc
  155.      chunk are no longer limited to those found in an AIFF/AIFF-C file.  Apps
  156.      should be written to expect and ignore miscellaneous chunks they do not
  157.      understand.
  158.  
  159.      Apps should be especially careful not to copy misc chunks from one file
  160.      to another unless they understand the content of those misc chunks;  the
  161.      chunk may contain references to other parts of the file which the
  162.      application has modified.  In this case the chunk in the new file becomes
  163.      corrupt.  This is to be avoided.  The chunk should not be copied and the
  164.      user should probably be warned.
  165.  
  166. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  167.      afOpenFile(3dm), afReadMisc(3dm), afInitMiscIDs(3dm), afSeekMisc(3dm).
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.